package org.ktjy.demoLian.page;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import java.util.List;

public class PageUti<T> extends Page<T> {



    private List<T> content;

    /**
     * 总记录数
     */
    private long totalElements;


    /**
     * 当前页码
     */
    private long number;
//
//    private Page<T> page;
//
//    public PageUtil(Page<T> page) {
//        this.page = page;
//    }
//
//    public PageUtil() {
//    }

    /**
     * 总页数
     */
    private long totalPages;

    public List<T> getContent() {
        return super.getRecords();
    }

    public void setContent(List<T> content) {
        this.content = content;
    }

    public long getTotalElements() {
        return super.getTotal();
    }

    public void setTotalElements(long totalElements) {
        this.totalElements = totalElements;
    }

    public long getNumber() {
        return super.getCurrent() - 1;
    }

    public void setNumber(long number) {
        this.number = number;
    }

    public long getTotalPages() {
        return super.getPages();
    }

    public void setTotalPages(long totalPages) {
        this.totalPages = totalPages;
    }
}
